package com.suray.wcs.service.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.suray.commin.annotation.Excel;
import com.suray.commin.core.utils.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("wcs_heart_log")
public class RgvHeartLogDB extends BaseModel implements Serializable {

    private static final long serialVersionUID = -8247913716050794361L;

    @TableId(value = "interface_log_id", type = IdType.AUTO)
    @Excel(name = "日志编号")
    private Integer interfaceLogId;     // 接口日志主键id

    @Excel(name = "设备名称")
    private String deviceName;      // 设备名称
    /**
     * 任务序号
     */
    @Excel(name = "任务序号")
    protected int taskNo;
    /**
     * 任务类型
     */
    @Excel(name = "任务类型")
    protected int taskType;
    /**
     * 小车位置
     */
    @Excel(name = "小车位置")
    private String rgvLocation;
    /**
     * 当前段序号
     */
    @Excel(name = "当前段序号")
    private Integer rgvCurrentSegment;
    /**
     * 当前段终点坐标
     */
    @Excel(name = "当前段终点坐标")
    private String segmentEndLocation;
    /**
     * 当前条码值
     */
    @Excel(name = "当前条码值")
    private String curBarcode;
    /**
     * 小车状态
     */
    @Excel(name = "小车状态")
    private Integer rgvStatus;
    /**
     * 托板状态 1字节
     */
    @Excel(name = "托板状态")
    private Integer palletStatus;
    /**
     * 换向状态 1字节
     */
    @Excel(name = "换向状态")
    private  int reserveStatus;
    /**
     * 行驶方向 1字节
     */
    @Excel(name = "行驶方向")
    private  int driveDirection;
    /**
     * 电量 1字节
     */
    @Excel(name = "电量")
    private  int electric;
    /**
     * 任务结果
     */
    @Excel(name = "任务结果")
    protected int taskResult;
    /**
     * 指令命令序号
     */
    @Excel(name = "电量")
    protected int cmdNo;
    /**
     * 指令执行结果
     */
    @Excel(name = "指令执行结果")
    protected int cmdResult;
    /**
     * 指令执行结果 1字节
     */
    @Excel(name = "指令执行结果")
    protected int cmdExecuteResult;
    /**
     * 指令结果参数
     */
    @Excel(name = "指令结果参数")
    protected int cmdExecuteResultParam;

    @Excel(name = "发送时间")
    private Date sendTime;      // 发送时间

    @TableField(exist = false)
    @Excel(name = "发送时间开始")
    private Date sendTimeStart; // 发送时间开始

    @Excel(name = "发送时间结束")
    @TableField(exist = false)
    private Date sendTimeEnd;   // 发送时间结束

    @Excel(name = "接收时间")
    private Date receTime;      // 接收时间

    @Excel(name = "消耗时间")
    private Long useTime;       // 消耗时间

    @TableField(exist = false)
    private Integer electricStart;

    @TableField(exist = false)
    private Integer electricEnd;

    @Override
    public String toString() {
        return "RgvHeartLogDB{" +
                "interfaceLogId=" + interfaceLogId +
                ", deviceName='" + deviceName + '\'' +
                ", rgvLocation='" + rgvLocation + '\'' +
                ", rgvCurrentSegment=" + rgvCurrentSegment +
                ", segmentEndLocation='" + segmentEndLocation + '\'' +
                ", curBarcode='" + curBarcode + '\'' +
                ", rgvStatus=" + rgvStatus +
                ", palletStatus=" + palletStatus +
                ", reserveStatus=" + reserveStatus +
                ", driveDirection=" + driveDirection +
                ", electric=" + electric +
                ", taskNo=" + taskNo +
                ", taskType=" + taskType +
                ", taskResult=" + taskResult +
                ", cmdNo=" + cmdNo +
                ", cmdResult=" + cmdResult +
                ", cmdExecuteResult=" + cmdExecuteResult +
                ", cmdExecuteResultParam=" + cmdExecuteResultParam +
                ", sendTime=" + sendTime +
                ", sendTimeStart=" + sendTimeStart +
                ", sendTimeEnd=" + sendTimeEnd +
                ", receTime=" + receTime +
                ", useTime=" + useTime +
                ", electricStart=" + electricStart +
                ", electricEnd=" + electricEnd +
                '}';
    }
}
